package cn.est.mapper;

import cn.est.dto.ModelDto;
import cn.est.pojo.Model;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 商品型号 Mapper 接口
 * </p>
 *
 * @author qf
 * @since 2021-08-04
 */
@Repository
public interface ModelMapper extends BaseMapper<Model> {

    List<ModelDto> findModelDtoListByBrandIdAndClassifyId(@Param(Constants.WRAPPER) QueryWrapper<Model> wrapper);

    List<ModelDto> search(Page<ModelDto> page, @Param(Constants.WRAPPER) QueryWrapper<Model> wrapper);

    ModelDto getModelDetailById(Long id);

    //List<ModelDto> findModelDtoListByBrandIdAndClassifyId(Long classifyId, Long brandId);
}
